<body>
    <script>
        const match = navigator.userAgent.match(/Mozilla\/5\.0 \((.*)\) AppleWebKit\/(.*) \(KHTML, like Gecko\) Chrome\/(.*) Safari\/(.*) Phantomas\/(.*)/);

        (phantomas => {
            if (match !== null) {
                phantomas.setMetric('device', match[1]);    
            }
            phantomas.setMetric('userAgent', navigator.userAgent);
        })(window.__phantomas);
    </script>
</body>
